package com.sgcc.pda.frme.protocol.ws.sendbean;

import android.text.TextUtils;

import androidx.annotation.NonNull;

/**
 * @author guorongxin
 * @date 2020/3/20
 * @fileName hw
 * @Description
 * @special 如修改此类请在下方添加备注并告知创建者，谢谢配合！
 * @VERSION 1.0
 */
public class RS485Params {
    private String botelv;
    private String jiaoyanType;
    private String databit;
    private String stopbit;
    private String longTime;

    public String getBotelv() {
        return botelv;
    }

    public void setBotelv(String botelv) {
        this.botelv = botelv;
    }

    public String getJiaoyanType() {
        return jiaoyanType;
    }

    public void setJiaoyanType(String jiaoyanType) {
        this.jiaoyanType = jiaoyanType;
    }

    public String getDatabit() {
        return databit;
    }

    public void setDatabit(String databit) {
        this.databit = databit;
    }

    public String getStopbit() {
        return stopbit;
    }

    public void setStopbit(String stopbit) {
        this.stopbit = stopbit;
    }

    public String getLongTime() {
        return longTime;
    }

    public void setLongTime(String longTime) {
        this.longTime = longTime;
    }

    @NonNull
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        if (TextUtils.isEmpty(botelv)){
            return "";
        }
        sb.append(botelv);
        if (TextUtils.isEmpty(jiaoyanType)){
            return "";
        }
        sb.append(jiaoyanType);
        if (TextUtils.isEmpty(databit)){
            return "";
        }
        sb.append(databit);
        if (TextUtils.isEmpty(stopbit)){
            return "";
        }
        sb.append(stopbit);
        if (TextUtils.isEmpty(longTime)){
            return "";
        }
        sb.append(longTime);

        return sb.toString();
    }
}
